//
//  MyMessageTableViewCell.m
//  eshow
//
//  Created by Hisoka on 15/12/11.
//  Copyright © 2015年 Hisoka. All rights reserved.
//

#import "MyMessageTableViewCell.h"

@implementation MyMessageTableViewCell

- (id) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.titleLB = [UILabel newAutoLayoutView];
        [self.contentView addSubview:_titleLB];
        
        [_titleLB autoPinEdge:ALEdgeTop toEdge:ALEdgeTop ofView:self.contentView withOffset:15];
        [_titleLB autoPinEdge:ALEdgeLeft toEdge:ALEdgeLeft ofView:self.contentView withOffset:20];
        [_titleLB autoSetDimensionsToSize:CGSizeMake(ScreenWidth - 30, 20)];
        _titleLB.textColor = ORANGE_COLOR;
        _titleLB.font = FONT_SIZE_18;
        _titleLB.backgroundColor = [UIColor clearColor];
        
        self.readLB = [UILabel newAutoLayoutView];
        [self.contentView addSubview:_readLB];
        
        [_readLB autoAlignAxis:ALAxisHorizontal toSameAxisOfView:_titleLB];
        [_readLB autoPinEdge:ALEdgeRight toEdge:ALEdgeLeft ofView:_titleLB withOffset:-10];
        [_readLB autoSetDimensionsToSize:CGSizeMake(6, 6)];
        _readLB.backgroundColor = [UIColor redColor];
        _readLB.layer.masksToBounds = YES;
        _readLB.layer.cornerRadius = 3.0f;
        _readLB.hidden = YES;
        
        self.dateLB = [UILabel newAutoLayoutView];
        [self.contentView addSubview:_dateLB];
        
        [_dateLB autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:_titleLB withOffset:5];
        [_dateLB autoPinEdge:ALEdgeLeft toEdge:ALEdgeLeft ofView:_titleLB];
        [_dateLB autoSetDimensionsToSize:CGSizeMake(100, 10)];
        _dateLB.textColor = GRAY_COLOR;
        _dateLB.font = [UIFont systemFontOfSize:10.0f];
        _dateLB.backgroundColor = [UIColor clearColor];
        
    }
    
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
